
\documentclass[onecolumn]{IEEEtran} %!PN
\usepackage[pdftex]{graphicx}
\usepackage{amssymb,amsmath}
\usepackage{subfigure}
\usepackage{calligra}
\usepackage{color}
\usepackage{mathcomp}
\usepackage{graphicx}
\usepackage{fancybox}
\usepackage{amstext}
\newcommand{\degree}{\ensuremath{^\circ}}%awesomely define a function
\definecolor{parchment}{rgb}{1,1,.761}
\definecolor{background}{rgb}{1,1,1}
\begin{document}

\pagecolor {background}

\title{\color{background}. \\\color{black}ModSim Project 3\\Trebuchet}

\author{Paul Booth\\
\texttt{paul.booth@students.olin.edu}}
%\date{October 5, 2009}
\markboth{Paul "Paul Booth" Booth and David "The" Gaynor, Trebuchet Lagrangian, December 4, 2009}{Paul "Paul Booth" Booth and David "The" Gaynor, Trebuchet Lagrangian, December 4, 2009}
\maketitle
\begin{eqnarray*}
\text{Lagrangian }\text{Equations}\\
L&=&T-V\\
\text{where}&&\\
L&=&\text{Lagrangian}\\
T&=&\text{kinetic energy}\\
V&=&\text{potential energy}\\
\text{}\\
\frac{d}{dt}(\frac{\delta L}{\delta \dot q})&=&\frac{dL}{dq}\\
\text{Trebuchet specific:}\\
\text{Positions of $m_1$ and $m_2$}&&\\
x_1&=&-R_1 cos(\theta)\\
y_1&=&-R_1 sin(\theta)\\
x_2&=&L_1 cos(\theta)+ L_2cos(\varphi)\\
y_2&=&L_1 sin(\theta)+L_2sin(\varphi)\\
\text{Velocities of $m_1$ and $m_2$}&&\\
\dot x_1&=&R_1 \dot \theta sin(\theta)\\
\dot y_1&=&-R_1 \dot \theta cos(\theta)\\
\dot x_2&=&-L_1 \dot \theta sin(\theta)- L_2 \dot \varphi sin(\varphi)\\
\dot y_2&=&L_1 \dot \theta cos(\theta)+L_2 \dot \varphi cos(\varphi)\\
T_{m_1}&=&\frac{1}{2} m_1 (\dot x_1^2 + \dot y_1^2)\\
&=&\frac{1}{2} m_1 ((R_1 \dot \theta sin(\theta))^2 + (-R_1 \dot \theta cos(\theta))^2)\\
&=&\frac{1}{2} m_1 R_1^2\dot \theta^2\\
T_{m_2}&=&\frac{1}{2} m_2 (\dot x_2^2 + \dot y_2^2)\\
&=&\frac{1}{2} m_2 ((-L_1 \dot \theta sin(\theta)- L_2 \dot \varphi sin(\varphi))^2 + (L_1 \dot \theta cos(\theta)+L_2 \dot \varphi cos(\varphi))^2)\\
&=&\frac{1}{2} m_2 (L_1^2 \dot \theta^2 sin^2(\theta)^2+ L_2^2 \dot \varphi^2 sin^2(\varphi) +2L_1 L_2 \dot \theta \dot \varphi sin(\theta)sin(\varphi)
\\&&+ L_1^2 \dot \theta^2 cos^2(\theta)+L_2^2 \dot \varphi^2 cos^2(\varphi)+2L_1 L_2 \dot \theta \dot \varphi cos(\theta)cos(\varphi) )\\
&=&\frac{1}{2} m_2 (L_1^2 \dot \theta^2+ L_2^2 \dot \varphi^2 +2L_1 L_2 \dot \theta \dot \varphi (sin(\theta)sin(\varphi)+ cos(\theta)cos(\varphi) ))\\
&=&\frac{1}{2} m_2 (L_1^2 \dot \theta^2+ L_2^2 \dot \varphi^2 +2L_1 L_2 \dot \theta \dot \varphi cos(\theta-\varphi))\\
T&=&T_{m_1}+T_{m_2}\\
T&=&\frac{1}{2} m_1 R_1^2\dot \theta^2+\frac{1}{2} m_2 (L_1^2 \dot \theta^2+ L_2^2 \dot \varphi^2 +2L_1 L_2 \dot \theta \dot \varphi cos(\theta-\varphi))\\
\end{eqnarray*}
\begin{eqnarray*}
V&=&m_1 g y_1+m_2 g y_2\\
V&=&-m_1 g R_1 sin(\theta)+m_2 g L_1 sin(\theta)+m_2 g L_2sin(\varphi)\\
L&=&T-V\\
L&=&\frac{1}{2} m_1 R_1^2\dot \theta^2+\frac{1}{2} m_2 (L_1^2 \dot \theta^2+ L_2^2 \dot \varphi^2 +2L_1 L_2 \dot \theta \dot \varphi cos(\theta-\varphi))-(-m_1 g R_1 sin(\theta)+m_2 g L_1 sin(\theta)+m_2 g L_2sin(\varphi))\\
L&=&\frac{1}{2} m_1 R_1^2\dot \theta^2+\frac{1}{2} m_2 (L_1^2 \dot \theta^2+ L_2^2 \dot \varphi^2 +2L_1 L_2 \dot \theta \dot \varphi cos(\theta-\varphi))+m_1 g R_1 sin(\theta)-m_2 g L_1 sin(\theta)-m_2 g L_2sin(\varphi)\\
L&=&\frac{1}{2} m_1 R_1^2\dot \theta^2+\frac{1}{2} m_2 L_1^2 \dot \theta^2+ \frac{1}{2} m_2 L_2^2 \dot \varphi^2 +m_2 L_1 L_2 \dot \theta \dot \varphi cos(\theta-\varphi)+m_1 g R_1 sin(\theta)-m_2 g L_1 sin(\theta)-m_2 g L_2sin(\varphi)\\
\text{$\theta$ calculations}\\
\frac{\delta L}{\delta \dot \theta}&=&m_1 R_1^2\dot \theta+m_2 L_1^2 \dot \theta+m_2 L_1 L_2 \dot \varphi cos(\theta-\varphi)\\
\frac{d}{dt}(\frac{\delta L}{\delta \dot \theta})&=&m_1 R_1^2\ddot \theta+m_2 L_1^2 \ddot \theta+m_2 L_1 L_2 \ddot \varphi cos(\theta-\varphi)+m_2 L_1 L_2 \dot \varphi (-sin(\theta-\varphi) (\dot \theta - \dot \varphi))\\
&=&m_1 R_1^2\ddot \theta+m_2 L_1^2 \ddot \theta+m_2 L_1 L_2 \ddot \varphi cos(\theta-\varphi)-m_2 L_1 L_2 \dot \theta \dot \varphi sin(\theta-\varphi) + m_2 L_1 L_2 \dot \varphi^2 sin(\theta-\varphi)\\
\frac{\delta L}{\delta \theta}&=&-m_2 L_1 L_2 \dot \theta \dot \varphi sin(\theta-\varphi)+m_1 g R_1 cos(\theta)-m_2 g L_1 cos(\theta)\\
\frac{d}{dt}(\frac{\delta L}{\delta \dot q})&=&\frac{dL}{dq}\\
\end{eqnarray*}
\begin{eqnarray*}
\Rightarrow m_1 R_1^2\ddot \theta+m_2 L_1^2 \ddot \theta+m_2 L_1 L_2 \ddot \varphi cos(\theta-\varphi)-m_2 L_1 L_2 \dot \theta \dot \varphi sin(\theta-\varphi) + m_2 L_1 L_2 \dot \varphi^2 sin(\theta-\varphi)\\=-m_2 L_1 L_2 \dot \theta \dot \varphi sin(\theta-\varphi)+m_1 g R_1 cos(\theta)-m_2 g L_1 cos(\theta)\\
\Rightarrow m_1 R_1^2\ddot \theta+m_2 L_1^2 \ddot \theta+m_2 L_1 L_2 \ddot \varphi cos(\theta-\varphi)+ m_2 L_1 L_2 \dot \varphi^2 sin(\theta-\varphi)=m_1 g R_1 cos(\theta)-m_2 g L_1 cos(\theta)&&\\
\Rightarrow (m_1 R_1^2+m_2 L_1^2) \ddot \theta+m_2 L_1 L_2  cos(\theta-\varphi) \ddot \varphi=m_1 g R_1 cos(\theta)-m_2 g L_1 cos(\theta)- m_2 L_1 L_2 \dot \varphi^2 sin(\theta-\varphi)&&\\
\end{eqnarray*}
\begin{eqnarray*}
\text{$\varphi$ calculations}\\
\frac{\delta L}{\delta \dot \varphi}&=&m_2 L_2^2 \dot \varphi +m_2 L_1 L_2 \dot \theta cos(\theta-\varphi)\\
\frac{d}{dt}(\frac{\delta L}{\delta \dot \varphi})&=&m_2 L_2^2 \ddot \varphi +m_2 L_1 L_2 \ddot \theta cos(\theta-\varphi)-m_2 L_1 L_2 \dot \theta^2 sin(\theta-\varphi) + m_2 L_1 L_2 \dot \theta \dot \varphi sin(\theta-\varphi)\\
\frac{\delta L}{\delta \varphi}&=&m_2 L_1 L_2 \dot \theta \dot \varphi sin(\theta-\varphi)-m_2 g L_2cos(\varphi)\\
\frac{d}{dt}(\frac{\delta L}{\delta \dot q})&=&\frac{dL}{dq}\\
\end{eqnarray*}
\begin{eqnarray*}
\Rightarrow m_2 L_2^2 \ddot \varphi +m_2 L_1 L_2 \ddot \theta cos(\theta-\varphi)-m_2 L_1 L_2 \dot \theta^2 sin(\theta-\varphi) + m_2 L_1 L_2 \dot \theta \dot \varphi sin(\theta-\varphi)\\
=m_2 L_1 L_2 \dot \theta \dot \varphi sin(\theta-\varphi)-m_2 g L_2cos(\varphi)\\
\Rightarrow m_2 L_2^2 \ddot \varphi +m_2 L_1 L_2 \ddot \theta cos(\theta-\varphi)-m_2 L_1 L_2 \dot \theta^2 sin(\theta-\varphi) \\
=-m_2 g L_2cos(\varphi)\\
\Rightarrow m_2 L_1 L_2 \ddot \theta cos(\theta-\varphi)+m_2 L_2^2 \ddot \varphi=-m_2 g L_2cos(\varphi)+m_2 L_1 L_2 \dot \theta^2 sin(\theta-\varphi)\\
\end{eqnarray*}
\begin{eqnarray*}
\text{Final Equations of Motion}\\
(m_1 R_1^2+m_2 L_1^2) \ddot \theta+m_2 L_1 L_2  cos(\theta-\varphi) \ddot \varphi&=&m_1 g R_1 cos(\theta)-m_2 g L_1 cos(\theta)- m_2 L_1 L_2 \dot \varphi^2 sin(\theta-\varphi)\\
m_2 L_1 L_2 \ddot \theta cos(\theta-\varphi)+m_2 L_2^2 \ddot \varphi&=&-m_2 g L_2cos(\varphi)+m_2 L_1 L_2 \dot \theta^2 sin(\theta-\varphi)\\
\end{eqnarray*}
\begin{figure}[h!]
\centering
\doublebox{
    \begin{minipage}{7in}
\includegraphics[width=7in]{Trebuchet_pic.png}
\caption{This is what our system looks like, with our variables labeled.}
\label{trebuchet}
\end{minipage}
}
\end{figure}
\end{document} 